import axios from "@/utils/request.js";

/**
 * 添加题解
 * @param {*} solutionInfo 
 * @returns 
 */
export const solutionAddService = (solutionInfo) => {
    return axios.post("/solutionInfo/add",solutionInfo)
}

/**
 * 分页查询题解信息
 * @param {*} pageNo 
 * @param {*} pageSize 
 * @param {*} titleFuzzy 
 * @returns 
 */
export const solutionSelectService = (pageNo,pageSize,titleId) => {
    return axios.get("/solutionInfo/loadDataList",{params:{
        pageNo,pageSize,titleId
    }})
}

/**
 * 根据题解id查询题解信息
 * @param {*} solutionId 
 * @returns 
 */
export const solutionGetService = (solutionId) => {
    return axios.get("/solutionInfo/getSolutionInfoBySolutionId",{params:{
        solutionId
    }})
}

/**
 * 根据solutionId修改题解信息
 * @param {*} solutionInfo 
 * @returns 
 */
export const solutionModifyService = (solutionInfo) => {
    return axios.put("/solutionInfo/updateSolutionInfoBySolutionId",solutionInfo)
}

/**
 * 根据solutionId删除题解信息
 * @param {*} solutionId 
 * @returns 
 */
export const solutionDeleteService = (solutionId) => {
    return axios.delete("/solutionInfo/deleteSolutionInfoBySolutionId",{params:{
        solutionId
    }})
}